<%-- 
    Document   : currentQuestion
    Created on : 26/09/2011, 9:26:25 AM
    Author     : David Bullock 42062222
    Descripton : Designed to hold  the dynamically populated questions to be called with ajax
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>test</title>
</head>
<body>
    <c:choose>
        <c:when test = "${empty question}">  <!--when there is no question-->
            <div id="question"><p>There is no question to display</p></div>
        </c:when>
        <c:otherwise> <!--There is a valid question, display it-->
            <div id="question"><h2><c:out value="${question.getText()}"/></h2></div>

            <%
                if (request.getParameter("p").equals("true")) {%>
            <div id ="display">${question.displayQuestion(0)}</div>
            <div id ="objects">
                <c:forEach items="${object}" var="ob">
                    <div style="text-align: center">${ob} </div> <br/>
                </c:forEach>
            </div>
            <%}%>
        </c:otherwise>
    </c:choose>


</body>